<%@ Page Title="" Language="C#" MasterPageFile="~/Admin/admin.master" AutoEventWireup="true"
    CodeFile="ReportPrinting.aspx.cs" Inherits="Admin_ReportPrinting" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder2" runat="Server">

    <script type="text/javascript">
        function ClearForm() {
            $('#<%=tb_VoucherDateFrom.ClientID%>').val('');
            $('#<%=tb_VoucherDateTo.ClientID%>').val('');
            return false;
        }
    </script>

</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <%--<script type="text/javascript">
        function ClearForm() {
            //$('#<%tb_AccCode.ClientID%>').text('');
            return false;
        }
    </script>--%>
    <table>
        <tr>
            <td>
                Voucher Date:
            </td>
            <td>
                <asp:TextBox ID="tb_VoucherDateFrom" runat="server" CssClass="text-input datepicker"></asp:TextBox>
            </td>
            <td>
                to
            </td>
            <td>
                <asp:TextBox ID="tb_VoucherDateTo" runat="server" CssClass="text-input datepicker"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td>
                &nbsp;
            </td>
            <td>
                <asp:Button ID="btn_Filter" runat="server" Text="Filter" CssClass="button" OnClick="btn_Filter_Click" />&nbsp;
                <asp:Button ID="btn_Clear" runat="server" Text="Clear" CssClass="button" OnClientClick="return ClearForm();" />
            </td>
            <td>
                &nbsp;
            </td>
            <td>
                &nbsp;
            </td>
        </tr>
        <tr>
            <td colspan="4">
                <asp:Label ID="lbl_Error" runat="server" Text="" ForeColor="Red" Font-Bold="True"></asp:Label>
            </td>
        </tr>
    </table>
    <h3>
        Report Printing
    </h3>
    <data:EntityGridView ID="grv_BatchList" runat="server" AutoGenerateColumns="False"
        AllowPaging="True" DataSourceID="" AllowExportToExcel="True" AllowSorting="True"
        ExportToExcelText="Excel" PageSelectorPageSizeInterval="10" OnPageIndexChanging="grv_BatchList_PageIndexChanging"
        AllowMultiColumnSorting="False" DefaultSortColumnName="AccntCode" DefaultSortDirection="Ascending"
        RecordsCount="0" ExcelExportFileName="ReportPrinting.xls" ShowGridOnEmptyData="False"
        OnExcelBeforeFormat="grv_BatchList_ExcelBeforeFormat">
        <Columns>
            <asp:BoundField DataField="PaymentRef" HeaderText="Payment Ref" SortExpression="PaymentRef" />
            <asp:BoundField DataField="PaymentType" HeaderText="Payment Type" SortExpression="PaymentType" />
            <asp:BoundField DataField="PaymentDate" HeaderText="Payment Date" SortExpression="PaymentDate" />
            <asp:BoundField DataField="DebitDate" HeaderText="Debit Date" SortExpression="DebitDate" />
            <asp:BoundField DataField="PaymentCurrency" HeaderText="Payment Currency" SortExpression="PaymentCurrency" />
            <asp:BoundField DataField="PayeeNameInEnglish" HeaderText="Payee Name In English"
                SortExpression="PayeeNameInEnglish" />
            <asp:BoundField DataField="CustomerPaymentReference" HeaderText="Customer Payment Reference"
                SortExpression="CustomerPaymentReference" />
            <asp:BoundField DataField="PayeeAccountNumber" HeaderText="Payee Account Number"
                SortExpression="PayeeAccountNumber" />
            <asp:BoundField DataField="DebitCurrency" HeaderText="Debit Currency" SortExpression="DebitCurrency" />
            <asp:BoundField DataField="DebitAmount" HeaderText="Debit Amount" SortExpression="DebitAmount" />
            <asp:BoundField DataField="DebitAccountNumber" HeaderText="Debit Account Number"
                SortExpression="DebitAccountNumber" />
            <asp:BoundField DataField="PaymentAmount" HeaderText="Payment Amount" SortExpression="PaymentAmount" DataFormatString="{0:#,##0}">
                <ItemStyle HorizontalAlign="Right"  />
            </asp:BoundField>
            <asp:BoundField DataField="ChequeNumber" HeaderText="Cheque Number" SortExpression="ChequeNumber" />
            <asp:BoundField DataField="BatchReference" HeaderText="Batch Reference" SortExpression="BatchReference" />
            <asp:BoundField DataField="ChequeClearDate" HeaderText="Cheque Clear Date" SortExpression="ChequeClearDate" />
            <asp:BoundField DataField="BackofficeReference" HeaderText="Backoffice Reference"
                SortExpression="BackofficeReference" />
            <asp:BoundField DataField="PaymentStatus" HeaderText="Payment Status" SortExpression="PaymentStatus" />
        </Columns>
    </data:EntityGridView>
</asp:Content>
